From: Colin Walters Date: Wed, 26 Apr 2023 13:37:22 +0000 (-0400) Subject: ci: Turn off errors for deprecated-declarations X-Git-Tag: archive/raspbian/2023.7-3+rpi1~1^2~9^2~2^2~7^2~1 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success/%22http:/www.example.com/cgi/success?a=commitdiff_plain;h=3391d8f3f0579e9686c43325dd8c8509a4844ac9;p=ostree.git ci: Turn off errors for deprecated-declarations Having `-Werror` on in CI only by default has generally worked OK, but I don't think it's worth trying to immediately scramble to port when they deprecate APIs. Motivated in this case by ``` src/libostree/ostree-fetcher-curl.c: In function 'initiate_next_curl_request': src/libostree/ostree-fetcher-curl.c:876:3: error: 'CURLOPT_PROTOCOLS' is deprecated: since 7.85.0. Use CURLOPT_PROTOCOLS_STR [-Werror=deprecated-declarations] 876 | rc = curl_easy_setopt (req->easy, CURLOPT_PROTOCOLS, (long)(CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FILE)); | ^~ ``` --- diff --git a/ci/build-check.sh b/ci/build-check.sh index aed8ba7e..716052c1 100755 --- a/ci/build-check.sh +++ b/ci/build-check.sh @@ -25,7 +25,7 @@ if test -x /usr/bin/clang; then if grep -q -e 'static inline.*_GLIB_AUTOPTR_LIST_FUNC_NAME' /usr/include/glib-2.0/glib/gmacros.h; then echo 'Skipping clang check, see https://bugzilla.gnome.org/show_bug.cgi?id=796346' else - export CFLAGS="-Wall -Werror ${CFLAGS:-}" + export CFLAGS="-Wall -Werror -Wno-error=deprecated-declarations ${CFLAGS:-}" git clean -dfx && git submodule foreach git clean -dfx export CC=clang build diff --git a/ci/build.sh b/ci/build.sh index 2afcd018..48605658 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -30,6 +30,6 @@ esac # always fail on warnings; https://github.com/ostreedev/ostree/pull/971 # NB: this disables the default set of flags from configure.ac -export CFLAGS="-Wall -Werror ${CFLAGS:-}" +export CFLAGS="-Wall -Werror -Wno-error=deprecated-declarations ${CFLAGS:-}" build --enable-gtk-doc ${CONFIGOPTS:-}